package com.tju.backend.oauth.config.abnormal;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.support.ReloadableResourceBundleMessageSource;

/**
 * 重新加载消息配置
 *
 * @Author CLS
 * @Date 2021/12/30 14:48
 */
@Configuration
public class ReloadMessageConfig {
    @Bean //加载中文认证提示信息
    public ReloadableResourceBundleMessageSource messageSource() {
        ReloadableResourceBundleMessageSource messageSource = new ReloadableResourceBundleMessageSource();
        messageSource.setBasename("classpath:org/springframework/security/messages_zh_CN");
        return messageSource;
    }
}